<div class="dialog">
    <table>
        <tbody>

            <tr class="prop">
                <td valign="top" class="name">
                    <label for="form_username">Username:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean:profile,field:'username','errors')}">
                    <input type="text" maxlength="20" id="form_username" name="username" value="${fieldValue(bean:profile,field:'username')}"/>
                </td>
            </tr>

            <tr class="prop">
                <td valign="top" class="name">
                    <label for="form_gender">Gender:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean:profile,field:'gender','errors')}">
                    <g:select id="form_gender" name="gender" from="['female', 'male']" value="${profile?.gender}"></g:select>
                </td>
            </tr>

            <tr class="prop">
                <td valign="top" class="name">
                    <label for="form_aboutMe">About Me:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean:profile,field:'aboutMe','errors')}">
                    <textarea rows="5" cols="40" id="form_aboutMe" name="aboutMe">${profile?.aboutMe?.encodeAsHTML()}</textarea>
                </td>
            </tr>

            <tr class="prop">
                <td valign="top" class="name">
                    <label for="form_interests">Interests:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean:profile,field:'interests','errors')}">
                    <textarea rows="5" cols="40" id="form_interests" name="interests">${profile?.interests?.encodeAsHTML()}</textarea>
                </td>
            </tr>

            <tr class="prop">
                <td valign="top" class="name">
                    <label for="form_occupation">Occupation:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean:profile,field:'occupation','errors')}">
                    <input type="text" maxlength="100" id="form_occupation" name="occupation" value="${fieldValue(bean:profile,field:'occupation')}"/>
                </td>
            </tr>

            <tr class="prop">
                <td valign="top" class="name">
                    <label for="form_birthday">Birthday:</label>
                </td>
                <td valign="top" class="value ${hasErrors(bean:profile,field:'birthday','errors')}">
                    <g:datePicker id="form_birthday" name="birthday" value="${profile?.birthday}" precision="day" years="${1990..1900}"></g:datePicker>
                </td>
            </tr>

        </tbody>
    </table>
</div>
